package sspersonserver.events;

import java.util.EventObject;

/**
 * Created by IntelliJ IDEA.
 * User: Double
 * Date: 17.01.12
 * Time: 15:00
 * To change this template use File | Settings | File Templates.
 */
public class PacketEvent extends EventObject
{
	private static final long serialVersionUID = -6326247162271636387L;
	private Object message;
	private Object type;
	private Object data;




	/**
	 * Constructs a prototypical Event.
	 *
	 * @param source The object on which the Event initially occurred.
	 * @throws IllegalArgumentException if source is null.
	 */
	public PacketEvent(Object source,Object message)
	{
		super(source);
		this.message = message;
	}
	public PacketEvent(Object source,Object type, Object data)
	{
		super(source);
		this.type = type;
		this.data = data;
	}

	public Object getMessage()
	{
		return message;
	}
	public Object getType()
	{
		return type;
	}
	public Object getData()
	{
		return data;
	}
	
	
	
	@Override
	public String toString()
	{
		return getClass().getName() + "[source = " + getSource() + ", message = " + message + "]";
	}
}
